package cn.iocoder.yudao.module.knowledge.dal.mysql.elecsigninfo;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.knowledge.dal.dataobject.elecsigninfo.ElecSignInfoDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.knowledge.controller.admin.elecsigninfo.vo.*;

/**
 * 售电签约信息 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface ElecSignInfoMapper extends BaseMapperX<ElecSignInfoDO> {

    default PageResult<ElecSignInfoDO> selectPage(ElecSignInfoPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ElecSignInfoDO>()
                .likeIfPresent(ElecSignInfoDO::getConsName, reqVO.getConsName())
                .likeIfPresent(ElecSignInfoDO::getAffCompany, reqVO.getAffCompany())
                .eqIfPresent(ElecSignInfoDO::getCreditCode, reqVO.getCreditCode())
                .betweenIfPresent(ElecSignInfoDO::getStartDate, reqVO.getStartDate())
                .betweenIfPresent(ElecSignInfoDO::getEndDate, reqVO.getEndDate())
                .betweenIfPresent(ElecSignInfoDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(ElecSignInfoDO::getId));
    }

}